import request from "@/utils/request";
import store from "@/store/index";

// 夹带k_token
function addK_Token(data) {
    var token = {
        k_token: store.getters.k_token
    };
    Object.assign(data, token);
    return data;
}

export function startExam(data) {
    return request({
        url: "/location_url/user/Grade.Stuhomework/startExam",
        method: "POST",
        headers: {},
        data: addK_Token(data)
    });
}
export function saveAnswer(data) {
    return request({
        url: "/location_url/user/Grade.Stuhomework/saveAnswer",
        method: "POST",
        headers: {},
        data: addK_Token(data)
    });
}
export function submitHomework(data) {
    return request({
        url: "/location_url/user/Grade.Stuhomework/submitHomework",
        method: "POST",
        headers: {},
        data: addK_Token(data)
    });
}
export function Examreport(data) {
    return request({
        url: "/location_url/user/Grade.Stuexam/Examreport",
        method: "POST",
        headers: {},
        data: addK_Token(data)
    });
}
export function Homeworkreport(data) {
    return request({
        url: "/location_url/user/Grade.Stuhomework/Homeworkreport",
        method: "POST",
        headers: {},
        data: addK_Token(data)
    });
}
export function homeworkAnalysis(data) {
    return request({
        url: "/location_url/user/Grade.Stuhomework/homeworkAnalysis",
        method: "POST",
        headers: {},
        data: addK_Token(data)
    });
}
export function ExamAnalysis(data) {
    return request({
        url: "/location_url/user/Grade.Stuexam/ExamAnalysis",
        method: "POST",
        headers: {},
        data: addK_Token(data)
    });
}
export function homeworkErrorAnalysis(data) {
    return request({
        url: "/location_url/user/Grade.Stuhomework/homeworkErrorAnalysis",
        method: "POST",
        headers: {},
        data: addK_Token(data)
    });
}
export function ExamErrorAnalysis(data) {
    return request({
        url: "/location_url/user/Grade.Stuexam/ExamErrorAnalysis",
        method: "POST",
        headers: {},
        data: addK_Token(data)
    });
}
export function getCorrectList(data) {
    return request({
        url: "/location_url/user/Grade.Stuhomework/getCorrectList",
        method: "POST",
        headers: {},
        data: addK_Token(data)
    });
}
export function saveRectifyanswer(data) {
    return request({
        url: "/location_url/user/Grade.Stuhomework/saveRectifyanswer",
        method: "POST",
        headers: {},
        data: addK_Token(data)
    });
}
// 自评列表
export function examLists(data) {
    return request({
        url: "/location_url/user/exam.Lists/examLists",
        method: "POST",
        headers: {},
        data: addK_Token(data)
    });
}
export function SelfTestState(data) {
    return request({
        url: "/location_url/user/selftest.users/SelfTestState",
        method: "POST",
        headers: {},
        data: addK_Token(data)
    });
}
export function examDetail(data) {
    return request({
        url: "/location_url/user/exam.Lists/examDetail",
        method: "POST",
        headers: {},
        data: addK_Token(data)
    });
}
export function examQuestion(data) {
    return request({
        url: "/location_url/user/exam.Lists/examQuestion",
        method: "POST",
        headers: {},
        data: addK_Token(data)
    });
}
export function correctExamlist(data) {
    return request({
        url: "/location_url/user/Grade.Stuexam/correctExamlist",
        method: "POST",
        headers: {},
        data: addK_Token(data)
    });
}
